package com.woniu.mapper;

import com.woniu.pojo.Complaint;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Yellow Docker
 * @since 2022-11-16
 */
public interface ComplaintMapper extends BaseMapper<Complaint> {

    @Select("SELECT c.* from c_complaint c,c_order_item o where c.order_id=o.id and o.shop_id=#{shopId}")
    @ResultType(Complaint.class)
    List<Complaint> selectShopComplain(Integer shopId);
}
